package right

import (
	"gitee.com/Hu-Lyndon/distill-resk/infra"
	"gitee.com/Hu-Lyndon/distill-resk/infra/right/casbins"
	"github.com/casbin/casbin/v2"
)

var (
	casbinEnforcer *casbin.Enforcer
)

func CasbinEnforcer() *casbin.Enforcer {
	return casbinEnforcer
}

type CasbinParty struct {
	infra.BaseStarter
}

func (c *CasbinParty) Setup(ctx infra.StarterContext) {
	casbinEnforcer = casbins.GetEnforcer()
}
